package com.suixinsanren.design.adapter.demo01;

public class Main {

    public static void main(String[] args) {
        Duck duck1 = new WildDuck();
        Turkey turkey1 = new BlackTurkey();

        testDuck(duck1);
        testDuck(new BirdAdapter(turkey1));

        testTurkey(turkey1);
        testTurkey(new BirdAdapter(duck1));

    }

    public static void testDuck(Duck duck){
        duck.quack();
        duck.fly();
    }

    public static void testTurkey(Turkey turkey){
        turkey.gobble();
        turkey.fly();
    }
}
